import java.util.LinkedList;

public class terminal extends Rule{
	public terminal(String sym){
		this.symbol = sym;
	}

	@Override
	public boolean isTerminal() {
		return true;
	}

	@Override
	public LinkedList<terminal> getFirst(){
		LinkedList<terminal> first = new LinkedList<terminal>();
		first.add(this);
		return first;
	}

	@Override
	public LinkedList<terminal> getFollow(){
		throw new RuntimeException();
	}

	@Override
	public String toString(){
		return this.symbol;
	}
}
